
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        
    <link rel="stylesheet" type="text/css" href="../js/util/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../js/util/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../js/util/easyui/demo.css">
    <script type="text/javascript" src="../js/util/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="../js/util/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/newajax.js"></script>
</head>
<body>
<form id="ajaxFrm">
<table>

            始发地:<input class="easyui-textbox"  name="depature" data-options="validType:'depature'" style="width:150px;height:30px">      
          目的地:<input class="easyui-textbox"    name="distinction" data-options="validType:'distinction'"  style="width:150px;height:30px">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      
      <a  class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="doFind()"  style="width:80px">查询</a>  
     <div id="ajaxDiv"></div>
      </table>
      <!--  <table id="showdiv" class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px"
            data-options="singleSelect:true,collapsible:true,url:'datagrid_data1.json',method:'get'">
         
        <thead>
            <tr>
                <th data-options="field:'ticketid',width:80">车票ID</th>
                <th data-options="field:'depature',width:80">始发地</th>
                <th data-options="field:'distinction',width:80">目的地</th>
                <th data-options="field:'trainno',width:80">车次</th>
                <th data-options="field:'starttime',width:150">开车时间</th>
                <th data-options="field:'seatno',width:60">座位号</th>
                <th data-options="field:'costtime',width:150">花费时间</th>
                <th data-options="field:'ticketno',width:150">余票</th>
                <th data-options="field:'choose',width:150">选择</th>
            </tr>
              
        
        </thead>
        </table> -->
      <table>
      <tr>
<td>
                                      每页显示
                <select name="pageSize" id="pageSize">
                    <option value="2"  >2</option>
                    <option value="3" >3</option>
                    <option value="4" >4</option>
                  </select>
                                        条信息&nbsp;&nbsp;&nbsp;
                                        
                                        第 <select name="start" id="start">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3" >3</option>
                    <option value="4" >4</option>
                    <option value="5" >5</option>
                  </select>
                  页
                  </td>

</tr>
  </table>  
   </form>
   
    <script type="text/javascript">
    function myformatter(date) {
		var y = date.getFullYear();
		var m = date.getMonth() + 1;
		var d = date.getDate();
		return y + '-' + (m < 10 ? ('0' + m) : m) + '-'
		+ (d < 10 ? ('0' + d) : d);
		}

function myparser(s) {
if (!s)
return new Date();
var ss = (s.split('-'));
var y = parseInt(ss[0], 10);
var m = parseInt(ss[1], 10);
var d = parseInt(ss[2], 10);
if (!isNaN(y) && !isNaN(m) && !isNaN(d)) {
return new Date(y, m - 1, d);
} else {
return new Date();
}
}
 
function doFind(){
	$.ajax({
	cache: false,
	type: "POST",
	url:"showTicket.jsp",	//把表单数据发送到ajax.jsp
	data:$('#ajaxFrm').serialize(),	//要发送的是ajaxFrm表单中的数据
	async: false,
	error: function(request) {
	alert("发送请求失败！");
	},
	success: function(data) {
	$("#ajaxDiv").html(data);	//将返回的结果显示到ajaxDiv中
	}
	});
	}  

</script> 
</body>
</html>